'use strict';
module.exports = appInfo => {
  const config = exports = {};

  // use for cookie sign key, should change to your own and keep security
  config.keys = appInfo.name + '_1527078445246_4984';

  // add your config here
  config.middleware = [];

  config.mysql = {
    client: {
      host: '120.25.144.98',
      port: '3306',
      user: 'root',
      password: '716673',
      database: 'demo',
    },
    app: true,
    agent: false,
  }

  config.cors = {
    origin: '*',
    allowMethods: 'GET,HEAD,PUT,POST,DELETE,PATCH',
  }

  config.security = {
    // xframe: {
    //   enable: false,
    // },
    // domainWhiteList: [ 'http://localhost:3334' ],
    csrf: {
      enable: false,
    }
  }

  config.oauth2Server = {
    grants: [ 'password', 'client_credentials' ],
  }

  return config;
};
